import request from '@/utils/request'

// 查询OMS调拨单列表
export function listTransferbill(query) {
  return request({
    url: '/settlementCenter/basebill/transferbill/list',
    method: 'get',
    params: query
  })
}

// 查询OMS调拨单详细
export function getTransferbill(id) {
  return request({
    url: '/settlementCenter/basebill/transferbill/' + id,
    method: 'get'
  })
}

// 新增OMS调拨单
export function addTransferbill(data) {
  return request({
    url: '/settlementCenter/basebill/transferbill',
    method: 'post',
    data: data
  })
}

// 修改OMS调拨单
export function updateTransferbill(data) {
  return request({
    url: '/settlementCenter/basebill/transferbill',
    method: 'put',
    data: data
  })
}

// 删除OMS调拨单
export function delTransferbill(id) {
  return request({
    url: '/settlementCenter/basebill/transferbill/' + id,
    method: 'delete'
  })
}

/**
 * 下查功能全集
 * @param Number
 */
// 查询下游单据
export function getDownBill(Number,type) {
  return request({
    url: '/settlementCenter/basebill/transferbill/DownBill/'+Number+'/'+type,
    method: 'get'
  })
}
// 查询下游单据详情
export function getDownBillInfo(id,type) {
  return request({
    url: '/settlementCenter/basebill/transferbill/getDownBillInfo/'+id+"/"+type,
    method: 'get'
  })
}
// 删除下游单据
export function delDownBill(ids,type) {
  return request({
    url: '/settlementCenter/basebill/transferbill/delDownBill/'+ids+"/"+type,
    method: 'get'
  })
}
// 回写上游单据类型状态
export function updataUpBill(id,type) {
  return request({
    url: '/settlementCenter/basebill/transferbill/updataUpBill/'+id+"/"+type,
    method: 'get'
  })
}
// 下发单据
export function handlePush(id,type) {
  return request({
    url: '/settlementCenter/basebill/transferbill/handlePush/'+id+"/"+type,
    method: 'get'
  })
}
